<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>商品分类</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,user-scalable=1" />
    <meta name="format-detection" content="telephone=no,email=no" />
    <meta name="mobileOptimized" content="width" />
    <meta name="handheldFriendly" content="true" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <link rel="stylesheet" href="/static/css/main.css" />
    <script src="/static/script/zepto.min.js"></script>
<!--    <script src="/static/script/transform.y.js"></script>-->
</head>
<body class="m-cate">

<a class="m-sch-btn" href="/web/search/index"><span>搜索</span></a>

<div class="list" id="J_sltCnt0">
    <ul class="f-cb">
        <?php foreach($list as $k=>$v) {?>
        <li><a href="javascript:toProductList('<?=$list[$k]['cid']?>','<?=$shop_id?>');"><img src="<?=$v['img'] ?>" /><span><?=$v['name']?></span></a></li>
        <?php }?>
    </ul>
</div>

<div style="display: block" class="m-nav f-cb u-bg1">
    <a href="/web/default/home">首页</a>
    <a href="javascript:;" class="z-on">分类</a>
    <a href="/web/cart/view?shop_id=<?= '1001'//yii::$app->session->get('shop_id')?>">购物车</a>
    <a href="/web/my">我的</a>
</div>

<script>

   // var img = $('#J_sltCnt0').find('img');
    //img.height(img.eq(0).width()-2);


    // 点击类目跳转到商品列表页面
    function toProductList(cid,shop_id) {
        window.location.href = 'product-list?shop_id='+ shop_id + '&cid=' + cid;
    }

</script>
</body>